package com.cysyz.mylib.utils;

import java.io.File;

/**
 * Created by cuiyong on 15/3/11.
 */
public class JarUtl {
    public String getJarDir(Class clazzInJar) {
        String path = clazzInJar.getProtectionDomain().getCodeSource().getLocation().getPath();
        int lastIndex = path.lastIndexOf(File.separator) +1;
        return path.substring(0, lastIndex);
    }
}
